<template>
  <div id="app">
    <!-- 路由页面显示区 -->
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'App',
  watch: {
    // eslint-disable-next-line no-unused-vars
    $router(to, from) {
      if (to.path !== '/login') {
        let obj = {
          name: to.name,
          title: to.title
        }
        this.$store.commit("addTab", obj)
      }
    }
  }
}
</script>

<style>
  html, body, #app {
    padding: 0;
    margin: 0;
    height: 100%;
  }
</style>
